import addressInfo from "@/utils/API/addressInfo";
import axiosInstance from "@/utils/axiosInstance";

const area = {
    /**
     * 根据parentI获取下级城市
     * @param {number} parentId
     * @returns {Promise<Object>}
     * */
    getListByParent(parentId) {
        return axiosInstance.get(`/area/getListByParentId`, {
            params: {
                parentId
            }
        });
    },
    /**
     * 获取省区的所有数据
     * @returns {Promise<Object>}
     * */
    getAllList() {
        return axiosInstance.get(`http://www.softeem.xin:9544/area/getAllList`);
    }
}

export default area;